#ifndef __CPIL_COLORMODEL_HPP__
#define __CPIL_COLORMODEL_HPP__


#include <sharedarray.hpp>


#define FREE_SPACE                  00
#define RGB_SPACE         RGB::Model()
#define GREY_SPACE       GREY::Model()
#define  YUV_SPACE        YUV::Model()
#define  XYZ_SPACE        XYZ::Model()
#define  CIELAB_SPACE  CieLAB::Model()


class ColorModel
{
    private:

    protected:

        ColorModel();
        ~ColorModel();

    public:

        virtual unsigned int getChannels() const=0;

};

class RGB : public ColorModel
{
    static RGB * model;

    public:

        static RGB * Model();
        static void free();

        virtual unsigned int getChannels() const;

};

class GREY : public ColorModel
{
    static GREY * model;

    public:

        static GREY * Model();
        static void free();


        virtual unsigned int getChannels() const;
};

class YUV : public ColorModel
{
    static YUV * model;


    public:

        static YUV * Model();
        static void free();

        virtual unsigned int getChannels() const;
};

class XYZ : public ColorModel
{
    static XYZ * model;

    public:

        static XYZ * Model();
        static void free();

        virtual unsigned int getChannels() const;
};

class CieLAB : public ColorModel
{
    static CieLAB * model;

    public:

        static CieLAB * Model();
        static void free();

        virtual unsigned int getChannels() const;
};




#endif
